import pygame

from role.Tank import Tank


class Player(Tank):

    def __init__(self, screen, first_player=True):
        if first_player:
            super().__init__(screen, "p1tank", top=700, left=450, stop=True)
        else:
            super().__init__(screen, "p2tank", top=700, left=650, stop=True)

    def fire(self):
        pygame.mixer.music.load("resources/fire.wav")
        pygame.mixer.music.play()
        super().fire()